package com.intre.open.gwtjpa.data.first.server.service;

import java.util.List;

import net.sf.gilead.gwt.PersistentRemoteService;

import com.intre.open.gwtjpa.data.first.client.service.DataFirstService;
import com.intre.open.gwtjpa.data.first.domain.Person;
import com.intre.open.gwtjpa.data.first.server.spring.DataFirstServiceSpring;
import com.intre.open.gwtjpa.data.first.server.spring.SpringUtils;

/**
 * Message remote service
 * 
 */
public class DataFirstServiceImpl extends PersistentRemoteService implements DataFirstService {

	/**
	 * 
	 */
	private static final long serialVersionUID = 9066248940129914324L;

	public DataFirstServiceSpring getService() {
		return (DataFirstServiceSpring) SpringUtils.getBean(this.getThreadLocalRequest(), DataFirstServiceSpring.FIRST_SERVICE_NAME);
	}

	@Override
	public List<Person> getAll() {
		return (List<Person>) getService().loadAll();
	}

}
